//
//  LLYFirstViewController.m
//  ZZ15091031LiuLeiYan
//
//  Created by qianfeng001 on 15/8/28.
//  Copyright (c) 2015年 刘雷岩. All rights reserved.
//

#import "LLYFirstViewController.h"

@interface LLYFirstViewController ()
{
    NSMutableArray *_imageArr;
}

@end

@implementation LLYFirstViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.hidden = YES;
    [self createImageArr];
    [self createImageView];
    
}

- (void)createImageArr {
    _imageArr = [NSMutableArray array];
    for (int i=0; i<17; i++) {
        UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"campFire%02d.gif",i+1]];
        [_imageArr addObject:image];
    }
    NSLog(@"%@",_imageArr);
}

- (void)createImageView {
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
    imageView.image = _imageArr[0];
    
    imageView.animationImages = _imageArr;
    imageView.animationDuration = _imageArr.count * 0.1;
    [imageView startAnimating];
    
    [self.view addSubview:imageView];
}


@end
